// main.qml
import QtQuick 2.3

Rectangle {
    width: 200; height: 100

    Text {
        id: timer
        anchors.centerIn: parent
        text: "Timer"
    }

    Connections {  // 连接信号
        target: applicationData
        onDataChanged: {
            timer.text = applicationData.getCurrentDateTime()
            console.log("The application data changed!")
        }
    }
}
